<template>
  <div class="login-container">
    <!-- Main content -->
    <div class="main-content">
      <!-- App logo -->
      <div class="app-logo">
        <div class="logo-container">
          <span class="logo-text">珍爱</span>
        </div>
      </div>

      <!-- Phone number display -->
      <div class="phone-number">
        <h2>182****6061</h2>
        <p class="service-provider">中国移动提供认证服务</p>
      </div>

      <!-- Login buttons -->
      <div class="login-buttons">
        <button class="primary-login-btn"  @click="myPhoneLogin()">本机号码一键登录</button>
        <div class="secondary-login-options">
          <span class="secondary-option" @click="MobileLoginPage()">已有账号密码登录</span>
          <span class="secondary-option">其他手机号登录</span>
          
        </div>
      </div>

      <!-- Terms and conditions -->
      <div class="terms-container">
        <label class="checkbox-container">
          <input type="checkbox" checked />
          <span class="checkmark"></span>
          <span class="terms-text">
            登录注册即表示同意
            <a href="#" class="terms-link">《中国移动服务与隐私协议条款》</a>
            和
            <a href="#" class="terms-link">《珍爱服务协议》</a>
            <a href="#" class="terms-link">《个人信息保护政策》</a>
            ，并使用本机号码登录
          </span>
        </label>
      </div>
    </div>

    <!-- Bottom indicator -->
    <div class="bottom-indicator"></div>
  </div>
</template>

<script setup>
import { useRoute, useRouter } from 'vue-router'

const router = useRouter()
const route = useRoute()
  const myPhoneLogin=()=>{

    
  }
  const MobileLoginPage=()=>{
    router.push('/login/sms')

  }



</script>

<style scoped>
.login-container {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #fff;
  color: #333;
  height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.status-bar {
  display: flex;
  justify-content: space-between;
  padding: 10px 15px;
  font-weight: 500;
}

.time {
  font-size: 16px;
}

.status-icons {
  display: flex;
  gap: 8px;
}

.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

.app-logo {
  margin-bottom: 30px;
}

.logo-container {
  width: 80px;
  height: 80px;
  background-image: linear-gradient(135deg, #ff9a9e 0%, #fad0c4 100%);
  border-radius: 15px;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 15px rgba(255, 154, 158, 0.3);
}

.logo-text {
  color: white;
  font-size: 32px;
  font-weight: bold;
}

.phone-number {
  text-align: center;
  margin-bottom: 40px;
}

.phone-number h2 {
  font-size: 28px;
  font-weight: normal;
  margin-bottom: 8px;
}

.service-provider {
  font-size: 14px;
  color: #888;
}

.login-buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 30px;
}

.primary-login-btn {
  width: 100%;
  padding: 16px;
  border-radius: 50px;
  background-color: #7d7dff;
  color: white;
  font-size: 16px;
  border: none;
  margin-bottom: 20px;
  cursor: pointer;
}

.secondary-login-options {
  width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: #555;
}

.secondary-option {
  cursor: pointer;
}

.terms-container {
  width: 100%;
  margin-top: 30px;
  font-size: 12px;
  color: #777;
  text-align: center;
}

.checkbox-container {
  display: flex;
  align-items: flex-start;
  position: relative;
  cursor: pointer;
}

.checkbox-container input {
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  position: relative;
  display: inline-block;
  height: 16px;
  width: 16px;
  border-radius: 50%;
  border: 1px solid #ddd;
  margin-right: 8px;
  top: 2px;
}

.checkbox-container input:checked ~ .checkmark:after {
  content: "";
  position: absolute;
  display: block;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #7d7dff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.terms-text {
  flex: 1;
  text-align: left;
  line-height: 1.5;
}

.terms-link {
  color: #7d7dff;
  text-decoration: none;
}

.bottom-indicator {
  width: 30%;
  height: 5px;
  background-color: #ddd;
  border-radius: 3px;
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
}

/* Background image styling */
.login-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><rect width="100%" height="100%" fill="transparent"/></svg>');
  opacity: 0.8;
  z-index: 0;
}
</style>
